#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
#include <stdlib.h>
#include <signal.h>

//volatile int quit = 0;

void handler(int sig)
{
    printf("pid: %lu, get a sig , No. %d\n", getpid(),sig);
}

int main()
{
   // signal(SIGCHLD, handler);
    signal(SIGCHLD, SIG_IGN);

    if(fork() == 0){
        printf("child running....m: pid: %lu, ppid: %lu\n", getpid(), getppid());
        sleep(5);
        printf("child quit!\n");
        exit(1);
    }
    while(1);
//    signal(2, handler);
//   while(!quit);
//    printf("end process!\n");
}
